package entity

// Account 账户信息
type Account struct {
	Address    string `json:"address,omitempty" required:"true" example:"0xfC97a1A683FB0108299D5725BC9d72899C9A86B4"` // 以太坊地址
	Mail       string `json:"mail,omitempty" example:"330596160@qq.com"`                                              // 邮箱地址
	Username   string `json:"username,omitempty" example:"ganyu"`                                                     // 用户名
	AlipayID   string `json:"alipayID,omitempty" example:"axmyor6190@sandbox.com"`                                    // 支付宝ID
	AlipayName string `json:"alipayName,omitempty" example:"axmyor6190"`                                              // 支付宝用户名
	Nonce      uint64 `json:"nonce,omitempty" example:"1"`
}

// GetAccountUri 获取账户信息的请求
type GetAccountUri struct {
	Address string `uri:"address" binding:"required" path:"address"  json:"address" required:"true" example:"0xfC97a1A683FB0108299D5725BC9d72899C9A86B4"`
}

// GetAccountResponse 获取账户信息的响应
type GetAccountResponse struct {
	Response
	Data Account `json:"data,omitempty"`
}

// PostAccountForm 创建 Account
type PostAccountForm struct {
	Signature string `json:"signature" binding:"required" required:"true" example:"0x1fdbee3be86c3dd83eaed068523b8fce52c9f1bbb6f47e8b6f3c3ef010e1e33e1d14e4d376128fd0ffe64e6f9f3e50bab99e934b5a908982b39ebdf4c8479a081c"`
	Address   string `json:"address" binding:"required" required:"true" example:"0xfC97a1A683FB0108299D5725BC9d72899C9A86B4"`
	Mail      string `json:"mail" binding:"required" required:"true" example:"330596160@qq.com"`
	Username  string `json:"username" binding:"required" required:"true" example:"ganyu"`
}

// PostAccountResponse 创建 Account 的响应
type PostAccountResponse GetAccountResponse

// PutAccountForm 修改 Account 请求
type PutAccountForm struct {
	Signature  string `json:"signature" binding:"required" required:"true" example:"0x1fdbee3be86c3dd83eaed068523b8fce52c9f1bbb6f47e8b6f3c3ef010e1e33e1d14e4d376128fd0ffe64e6f9f3e50bab99e934b5a908982b39ebdf4c8479a081c"`
	Address    string `json:"address" binding:"required" required:"true" example:"0xfC97a1A683FB0108299D5725BC9d72899C9A86B4"`
	Mail       string `json:"mail" binding:"required" required:"true" example:"330596160@qq.com"`
	Username   string `json:"username" binding:"required" required:"true" example:"ganyu"`
	AlipayID   string `json:"alipayID" binding:"-" example:"axmyor6190@sandbox.com"`
	AlipayName string `json:"alipayName" binding:"-" example:"axmyor6190"`
}

// PutAccountResponse 修改 Account 请求
type PutAccountResponse PostAccountResponse
